package com.moonlit.myspring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Component;


public class TestComponent {

    public static void main(String[] args) {
        ApplicationContext context= new ClassPathXmlApplicationContext("sping-idol.xml");
        Hero hero=(Hero)context.getBean("guanyu");
        hero.perform();
    }
}
